package Meituan;

import com.alibaba.fastjson.JSONObject;

import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author: leiwenkang02@meituan.com
 * @date: 2018/12/15
 * @time: 18:13
 */
public class Test29 {
    public static void main(String[] args) throws Exception{
        long start = System.currentTimeMillis();
        for (int i = 0; i < 1; i++) {
            getActivityExpireTime(1545062400);
//            "1;2;3".split(";");
        }

        System.out.println("finish");
        System.out.println(System.currentTimeMillis() - start);

    }

    private static int getActivityExpireTime(int activityStartTime) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date(activityStartTime * 1000L));
        calendar.add(Calendar.MONTH, 2);
        return (int)(calendar.getTimeInMillis() / 1000L - System.currentTimeMillis() / 1000L) + 24 * 60 * 60 * 3;
    }
}
